package com.elinkway.infinitemovies.bigdata;

import android.content.Context;
import android.content.SharedPreferences;

import com.elinkway.infinitemovies.config.SettingManage;
import com.elinkway.infinitemovies.ui.activity.LoginActivity;
import com.lvideo.http.bean.LVideoBaseBean;
import com.lvideo.http.bean.LVideoDataHull;

public class BigDataEnvTask extends BigDataBaseTask {

    @Override
    public boolean execute() {
        String nt = BigDataUtils.getNetType(BigDataStats.getcontext());
        SharedPreferences loginSp = BigDataStats.getcontext().getSharedPreferences(SettingManage.LOGIN_INFO, Context.MODE_PRIVATE);
        String uid = loginSp.getString(LoginActivity.UID, "");
        putParam("nt", nt);
        LVideoDataHull<LVideoBaseBean> d = BigDataApi.postEnv(null, nt, "", "", uid);
        return d.getDataType() == LVideoDataHull.DataType.DATA_PARSER_IS_NULL;
    }
}
